package cn.gson.school.entity.caiwu;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;

import cn.gson.school.entity.jiaoxue.ClassEntity;
import cn.gson.school.entity.jiaoxue.StudentEntity;
import cn.gson.school.entity.xitong.UserInfoEntity;

/**
 * 退款详情表
 * 
 * @author lc
 *
 */
@Entity
@Table(name = "tb_tuikuan")
public class TuiKuanEntity {
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name = "tuikuan_id")
	private Long tuikuanId;//退款记录编号
	
	@ManyToOne
	@JoinColumn(name="userinfo_id")
	private UserInfoEntity userinfoId;//操作人
	
	//
	@OneToOne
	@JoinColumn(name="class_id")
	private ClassEntity classId;//班级编号
	//学生详情、后面加的
	@OneToOne
	@JoinColumn(name="studentinfo_id")
	private StudentEntity studentinfoId;//学生ID
	
	//
	@Column(name = "tuikuan_money")
	private Double tuikuanMoney;//退款金额
	
	@Column(name = "tuikuan_reason")
	private String tuikuanReason;//退款原因
	
	@Column(name = "tuikuan_time")
	@JsonFormat(pattern="yyyy-MM-ddHH:mm:ss")
	private Date tuikuanTime;//退款时间

	public Long getTuikuanId() {
		return tuikuanId;
	}

	public void setTuikuanId(Long tuikuanId) {
		this.tuikuanId = tuikuanId;
	}

	public UserInfoEntity getUserinfoId() {
		return userinfoId;
	}

	public void setUserinfoId(UserInfoEntity userinfoId) {
		this.userinfoId = userinfoId;
	}

	public ClassEntity getClassId() {
		return classId;
	}

	public void setClassId(ClassEntity classId) {
		this.classId = classId;
	}

	public StudentEntity getStudentinfoId() {
		return studentinfoId;
	}

	public void setStudentinfoId(StudentEntity studentinfoId) {
		this.studentinfoId = studentinfoId;
	}

	public Double getTuikuanMoney() {
		return tuikuanMoney;
	}

	public void setTuikuanMoney(Double tuikuanMoney) {
		this.tuikuanMoney = tuikuanMoney;
	}

	public String getTuikuanReason() {
		return tuikuanReason;
	}

	public void setTuikuanReason(String tuikuanReason) {
		this.tuikuanReason = tuikuanReason;
	}

	public Date getTuikuanTime() {
		return tuikuanTime;
	}

	public void setTuikuanTime(Date tuikuanTime) {
		this.tuikuanTime = tuikuanTime;
	}

	@Override
	public String toString() {
		return "TuiKuanEntity [tuikuanId=" + tuikuanId + ", userinfoId=" + userinfoId + ", classId=" + classId
				+ ", studentinfoId=" + studentinfoId + ", tuikuanMoney=" + tuikuanMoney + ", tuikuanReason="
				+ tuikuanReason + ", tuikuanTime=" + tuikuanTime + "]";
	}

	
}
